package com.cheng.service.takedelivery;

import java.util.Date;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import com.cheng.domain.page.PageBean;
import com.cheng.domain.takedelivery.Promotion;

@Service
public interface PromotionService {
	
	@GET
	@Path("/allpromotion")
	@Produces({"application/xml","application/json"})
	public PageBean<Promotion> getPromoationByPage(@QueryParam("page") Integer page,@QueryParam("rows") Integer rows);
	
	@GET
	@Path("/promotionmessage/{id}")
	@Produces({"application/xml","application/json"})
	public Promotion getPromoationMessage(@PathParam("id") Integer id);
	

	// 保存宣传任务
	void save(Promotion promotion);

	// 分页查询
	Page<Promotion> findPageData(Pageable pageable);

	public void updatePromotion(Date date);
	
}
